import sqlite3
import os.path

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, "data.db")
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute("select * from tasks where id>0")
values = cursor.fetchall()
print(values)

for i in values:
    a = list(i)
    print(a[1])

cursor.close()
conn.close()